package gd.qaq.blue.bluespick.util;
public class LotteryUtil {
    /**
     * @param chance 中奖几率
     * @return 是否中奖
     */
    public static boolean lottery(double chance) {
        double random = Math.random() * 100;
        //如果生成的随机数小于中奖几率,则判定为中奖
        if (chance >= random) {
            return true;
        }
        return false;
    }
}  